feat(gen2-migration): gen2 migration codebuild e2e workflow#14791
Open
iankhou wants to merge 12 commits intogen2-migrationfrom
Open
feat(gen2-migration): gen2 migration codebuild e2e workflow#14791iankhou wants to merge 12 commits intogen2-migrationfrom
iankhou wants to merge 12 commits intogen2-migrationfrom
Conversation
…tion failure in gen1
…credential refresh in CI
cf89b0a to
f46c91c
Compare
Contributor
Author
|
Codebuild: https://tiny.amazon.com/nhf82d4a/IsenLink Not reported to this PR due to rebase. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of changes
CodeBuild Infrastructure
Added the complete CodeBuild pipeline for running Gen2 migration E2E tests:
gen2_migration_pr_workflow.yml— batch workflow that builds the CLI, publishes to Verdaccio, builds the linux pkg binary, then runs all migration apps in parallelrun_gen2_migration_e2e.yml— per-app buildspec that loads the cached binary and runs a single migration testupload_pkg_binaries_linux_only.yml— uploads only the linux binary (the migration workflow doesn't need macOS/Windows)cloud-gen2-migration.sh— CI entry points for triggering the workflow_runGen2MigrationE2Einshared-scripts.sh— configures AWS credentials via a named profile, unsets credential env vars to avoid SDK conflicts, bootstraps CDK, configures git identity, and runs the migration test_uploadPkgBinariesLinuxOnlyinshared-scripts.sh— caches only the linux binary to S3Resource Teardown
Added a
--teardownCLI option that cleans up all deployed resources after test execution:ampx sandbox delete --yes-holdingsuffix created during refactor)This uses direct SDK calls instead of
amplify deletebecause the migration mutates the workspace and breaksamplify delete. The teardown runs in afinallyblock so it executes whether the test passes or fails. All migration apppackage.jsonfiles pass${TEARDOWN:+--teardown}, and the buildspec setsTEARDOWN=1.--RoleArnoptionAdded a
--roleArnGen 2 Migration CLI option that takes an IAM Role ARN, which the Gen 2 Migration CLI uses to assume a role and get/refresh credentials for running the migration.--profileoptionGit Init Fix
Changed
git inittogit init --initial-branch=mainingit.tsso the default branch is alwaysmain. This fixes checkout failures in CodeBuild where the default branch name ismaster.Binary Packaging Fix (yao-pkg/pkg#195, yao-pkg/pkg#189)
A
yarn.lockdrift bumpedget-intrinsicfrom1.3.0to1.3.1, which addedasync-function,async-generator-function, andgenerator-functionas new dependencies. These packages ship with a"module-sync"export condition that points to.mjsentry points. Insidepkg's snapshot filesystem, the ESM module resolution triggered bymodule-syncfails withERR_MODULE_NOT_FOUND.The fix patches the affected packages during
generatePkgCliby stripping the"module-sync"line from theirpackage.jsonviased. Node then falls through to the"default"condition which points to a CJS file thatpkghandles correctly.Description of how you validated changes
CodeBuild runs in an account dedicated to E2E workflow runs. Uses existing CodeBuild job AmplifyCLI-E2E-Testing.
Checklist
yarn testpassesBy submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.